package com.tambapps.p2p.fandem

import com.tambapps.p2p.fandem.model.FileData
import com.tambapps.p2p.speer.Peer
import java.net.InetAddress

class SenderPeer(ip: InetAddress, port: Int, var deviceName: String, var files: List<FileData>) :
    Peer(ip, port) {
    fun peerString(): String {
        return super.toString()
    }

    fun peerEquals(peer: Peer): Boolean {
        return super.equals(peer)
    }

    companion object {
        const val DEFAULT_PORT = 8081
        fun of(peer: Peer, deviceName: String, files: List<FileData>): SenderPeer {
            return SenderPeer(peer.address, peer.port, deviceName, files)
        }
    }
}
